import Login from '@/views/Login'
import Home from '@/views/Home'
import NotFound from '@/views/404'
import Renovation from '@/views/renovation/Renovation'
import Classification from '@/views/goodsCenter/classification'
import AddGoods from '@/views/goodsCenter/addGoods'
import GoodsList from '@/views/goodsCenter/goodsList'
import EditGoods from '@/views/goodsCenter/editGoods'
import Users from '@/views/users/users'
import Order from '@/views/order/order'
import Logistics from '@/views/logistics/logistics'
import Chart from '@/views/chart/chart'


let routes = [
  {
    path: '/login',
    component: Login,
    name: '',
    hidden: true
  },
  {
    path: '/404',
    component: NotFound,
    name: '',
    hidden: true
  },
  {
    path: '/',
    component: Home,
    name: '报表中心',
    leaf: true,//只有一个节点
    children: [
      { path: '/chart/chart.vue', component: Chart , name: '报表中心'}
    ],
    hidden: true
  },
  {
    path: '/',
    component: Home,
    name: '店铺装修',
    leaf: true,
    children: [
      { path: '/renovation/Renovation.vue', component: Renovation , name: '店铺装修' }
    ],
    hidden: true
  },
  {
    path: '/',
    component: Home,
    name: '商品中心',
    children: [
      { path: '/goodsCenter/goodsList.vue', component: GoodsList , name: '商品列表' },
      { path: '/goodsCenter/addGoods.vue', component: AddGoods , name: '新建商品' },
      { path: '/goodsCenter/classification.vue', component: Classification , name: '分类管理' },
      { path: '/goodsCenter/editGoods.vue', component: EditGoods , name: '修改商品' , hidden: true}
    ],
    hidden: true
  },
  {
    path: '/',
    component: Home,
    name: '订单中心',
    leaf: true,
    children: [
      { path: '/order/order.vue', component: Order , name: '订单中心' }
    ],
    hidden: true
  },
  {
    path: '/',
    component: Home,
    name: '物流中心',
    leaf: true,
    children: [
      { path: '/logistics/logistics.vue', component: Logistics , name: '物流中心' }
    ],
    hidden: true
  },
  {
    path: '/',
    component: Home,
    name: '用户管理',
    leaf: true,//只有一个节点
    children: [
      { path: '/users/users.vue', component: Users , name: '用户管理' }
    ],
    hidden: true
  },
  {
    path: '*',
    hidden: true,
    redirect: { path: '/404' }
  }
];

export default routes;
